import java.util.Arrays;

public class s {
    public static void main(String[] args) {
        //array[行的坐标][列的坐标]

        //二维数组的定义：
        int[][] array1 = {{1, 2, 3}, {4, 5, 6}};
        int[][] array2 = new int[][]{{1, 2, 3}, {4, 5, 6}};
        int[][] array3 = new int[2][3];//0

        //二维数组的遍历
        int[][] array4 = {{1, 2, 3}, {4, 5, 6}};
        /*for(int i= 0;i < 2;i++){
            for(int j = 0;j < 3;j++){
                System.out.print(array4[i][j] + " ");
            }
            System.out.println();*/
        //二维数组是特殊的一维数组

            for(int i = 0;i < array4.length;i++){
                for(int j = 0;j < array1[i].length;j++){
                    System.out.print(array4[i][j] + " ");
                }
                System.out.println();
        }

        //打印二维数组
        System.out.println(Arrays.deepToString(array1));
        //不规则的二维数组
        int [][] array5 = new int[2][];
        array3[0] = new int[]{1,2,3};
        array3[1] = new int[]{1,2,3,4,5,6,7};
    }










}
